#ifndef VDUSER_H
#define VDUSER_H

#include <QString>
#include <QByteArray>

#include "VDEnums.h"

class VDUser
{
public:
	static VDUser* makeNew(const QString &name);
	static VDUser* makeFromData(const QByteArray& data);
	//static VDUser* makeFromSettings();

public:
	//	void saveToXml();

	quint16 getCheckSum() const { return m_checkSum; }
	QString getID() const { return m_ID; }
	QString getName() const { return m_name; }
	QByteArray getData() const { return m_data; }

	void setName(const QString &name);

	VDUser(const QString &ID, const QString &name);

	VD::UserState m_state;

	int m_countAnswer;

protected:

private:
	void makeData();

private:
	QString m_ID;
	QString m_name;
	//QString m_displayName;


private:
	QByteArray m_data;
	quint16 m_checkSum;

private:
	VDUser();
	VDUser(const VDUser&);
	VDUser& operator=(const VDUser&);};

#endif // VDUSER_H
